﻿using System;

namespace SharePointContentGenerator.ContentGeneratorLogic.Core
{
    public enum ContentGeneratorAction
    {
        None,
        Adding,
        Creating,
        Deleting,
        Downloading,
    }

    [Serializable]
    public class ContentGenerationTaskEventArgs : EventArgs
    {
        public bool Cancel { get; set; }
        public int TotalTasks { get; set; }
        public int CurrentTaskIndex { get; set; }
        public string TaskName { get; set; }

        public ContentGenerationTaskEventArgs()
        {
            Cancel = false;
            TotalTasks = -1;
            CurrentTaskIndex = -1;
        }
    }

    [Serializable]
    public delegate void ContentGenerationTaskEventHandler(object sender, ContentGenerationTaskEventArgs e);

    [Serializable]
    public class ContentGeneratorItemEventArgs : EventArgs
    {
        public bool Cancel { get; set; }
        public int TotalItems { get; set; }
        public int CurrentItemIndex { get; set; }
        public string ItemName { get; set; }
        public ContentGeneratorAction CurrentAction { get; set; }

        public ContentGeneratorItemEventArgs()
        {
            Cancel = false;
            TotalItems = -1;
            CurrentItemIndex = -1;
            CurrentAction = ContentGeneratorAction.None;
        }
    }

    [Serializable]
    public delegate void ContentGenerationItemEventHandler(object sender, ContentGeneratorItemEventArgs e);
}
